//
//  ControlsManager.h
//  homework
//
//  Created by weiwang on 15/11/10.
//  Copyright © 2015年 zyb. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BaseLibHeader.h"

#import <UIKit/UIKit.h>


typedef NS_ENUM(NSInteger, ItemLocate){
    LeftItem,
    rightItem,
};

@interface ControlsManager : NSObject


 
//label creator
+ (UILabel *)getLabelWithFont:(UIFont *)font
                 textAligment:(NSTextAlignment)aligment
                        frame:(CGRect)frame
                    textColor:(UIColor *)color;

//barButtonItem creator
+ (UIBarButtonItem *)createBarButton: (NSString *)text
                     mormalImageName: (NSString *)mormalImageName
                 hightLightImageName: (NSString *)hightLightImageName
                              target: (id)target
                            selector: (SEL)selector
                              locate: (ItemLocate)locate;

+ (UIBarButtonItem *)createImageTypeBarButtonWithNormalImageName:(NSString *)mormalImageName
                          hightLightImageName:(NSString *)hightLightImageName
                                       target: (id)target
                                     selector: (SEL)selector
                                       locate:(ItemLocate)locate;

+ (UIBarButtonItem *)createImageTypeBarButton:(NSString *)mormalImageName
                                       target: (id)target
                                     selector: (SEL)selector
                                       locate:(ItemLocate)locate;

+ (UIBarButtonItem *)createTextTypeBarButtonWithText: (NSString *)text
                                      target: (id)target
                                    selector: (SEL)selector
                                      locate:(ItemLocate)locate;

//buttonCreate
+ (UIButton *)createButtonWithText:(NSString *)text
                       normalColor:(UIColor*)normalColor
                   hightLightColor:(UIColor *)hightLightColor
                          textFont:(UIFont *)textFont
                   mormalImage:(UIImage *)mormalImage
               hightLightImage:(UIImage *)hightLightImage
                             frame:(CGRect)frame
                            target:(id)target
                          selector:(SEL)selector;

+ (UIButton *)createButtonWithText:(NSString *)text
              mormalImageName: (NSString *)mormalImageName
          hightLightImageName:(NSString *)hightLightImageName
                        frame:(CGRect)frame
                       target:(id)target
                     selector:(SEL)selector;

+ (UIButton *)createButtonWithText:(NSString *)text
                   mormalImageName: (NSString *)mormalImageName
               hightLightImageName:(NSString *)hightLightImageName
                             frame:(CGRect)frame;

+ (UIButton *)createButtonWithText:(NSString *)text
                       frame:(CGRect)frame
                      target:(id)target
                    selector:(SEL)selector;

+ (UIBarButtonItem *)barWithImage:(UIImage *)image
                    selectedImage:(UIImage *)selectedImage
                  backgroundImage:(UIImage *)backgroundImage
          selectedBackgroundImage:(UIImage *)selectedBackgroundImage
                           target:(id)target
                           action:(SEL)action;

+ (UIButton *)createButtonWithNormalImageName:(NSString *)mormalImageName
         hightLightImageName:(NSString *)hightLightImageName
                       frame:(CGRect)frame
                      target:(id)target
                    selector:(SEL)selector;

+ (UIButton *)createButtonWithImageName:(NSString *)ImageName
                                  frame:(CGRect)frame
                                 target:(id)target
                               selector:(SEL)selector;

+ (UIButton *)createButtonWithButtonImage:(NSString *)imageName
                        selectButtonImage:(NSString *)seleceImageName
                                    frame:(CGRect)frame
                                     text:(NSString *)text
                                textColor:(UIColor *)textColor
                          backgroundColor:(UIColor *)backgroundColor
                                 textFont:(UIFont *)textFont
                                   target:(id)target
                                 selector:(SEL)selector;

+ (UIButton *)createDefaultBackColorButtonWithButtonImage:(NSString *)imageName
                        selectButtonImage:(NSString *)seleceImageName
                                    frame:(CGRect)frame
                                     text:(NSString *)text
                                 textFont:(UIFont *)textFont
                                   target:(id)target
                                 selector:(SEL)selector;

+ (UIButton *)createDefaultBackColorAndFontButtonWithButtonImage:(NSString *)imageName
                        selectButtonImage:(NSString *)seleceImageName
                                    frame:(CGRect)frame
                                     text:(NSString *)text
                                   target:(id)target
                                 selector:(SEL)selector;

+ (UILabel *)createDefaultLabelImageViewWithFrame:(CGRect)frame;
+ (UIImageView *)createDefaultBadgeWithString:(NSString *)string;


+ (void)addBadgeViewForView:(UIView *)view
              animationType:(WBadgeAnimType)type
                 badgeStyle:(WBadgeStyle)badgeStyle
              contentOffset:(CGPoint)contentOffset
                      value:(NSInteger)value;

+ (void)addBadgeViewForView:(UIView *)view
              animationType:(WBadgeAnimType)type
                 badgeStyle:(WBadgeStyle)badgeStyle
              contentOffset:(CGPoint)contentOffset
                      value:(NSInteger)value
            backgroundColor:(UIColor *)backColor;

+ (void)addBadgeViewForBarItem:(UIBarButtonItem *)view
                 animationType:(WBadgeAnimType)type
                    badgeStyle:(WBadgeStyle)badgeStyle
                 contentOffset:(CGPoint)contentOffset
                         value:(NSInteger)value;

+ (void)addBadgeViewForBarItem:(UIBarButtonItem *)view
                 animationType:(WBadgeAnimType)type
                    badgeStyle:(WBadgeStyle)badgeStyle
                 contentOffset:(CGPoint)contentOffset
                         value:(NSInteger)value
               backgroundColor:(UIColor *)backColor;
 

@end
